﻿package ygg.printer
{
	import j.sus2maj7.printer.*;
	
	public class TraitPrinter extends AbstractPrinter
	{
		
		public function TraitPrinter()
		{
			super();
		}
		
		protected function cleanClass(s:String):String
		{
			var j:int;
			var rs:String = s;
			if ( (j = s.lastIndexOf('::')) > -1)
				rs = s.substr(j + 2 );
			if ( (j = s.lastIndexOf('>')) > -1)
				rs = 'Vector_' + rs.substr(0, rs.length - 1);
			return rs;
		}
		protected function getPackage(s:String):String
		{
			var j:int;
			var rs:String = '';
			if ( (j = s.lastIndexOf('::')) > -1)
				rs = s.substr(0, j );
			return rs;
		}
		protected function isPrivate(s:String):Boolean
		{
			return (s.indexOf('private::') == 0);
		}
		
	}
	
}